#!/bin/bash


cat $1 | awk -F ' ' '{print $2}' > install_pkg
cat install_pkg | while read line
do
	#according binary pkgname to Find source pkgname
	dnf repoquery -i "${line%%-[0-9]*}" | grep Source | head -1 >> install_pkg_src_rpm
done
rm install_pkg -f
